package com.ruoyi.social.service.impl;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.social.mapper.SocialKolUserMapper;
import com.ruoyi.social.domain.SocialKolUser;
import com.ruoyi.social.service.ISocialKolUserService;

/**
 * 用户商品关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-24
 */
@Service
public class SocialKolUserServiceImpl implements ISocialKolUserService 
{
    @Autowired
    private SocialKolUserMapper socialKolUserMapper;

    /**
     * 查询用户商品关联
     * 
     * @param userId 用户商品关联主键
     * @return 用户商品关联
     */
    @Override
    public SocialKolUser selectSocialKolUserByUserId(Long userId)
    {
        return socialKolUserMapper.selectSocialKolUserByUserId(userId);
    }

    /**
     * 查询用户商品关联列表
     * 
     * @param socialKolUser 用户商品关联
     * @return 用户商品关联
     */
    @Override
    public List<SocialKolUser> selectSocialKolUserList(SocialKolUser socialKolUser)
    {
        return socialKolUserMapper.selectSocialKolUserList(socialKolUser);
    }

    /**
     * 新增用户商品关联
     * 
     * @param socialKolUser 用户商品关联
     * @return 结果
     */
    @Override
    public int insertSocialKolUser(SocialKolUser socialKolUser)
    {
        return socialKolUserMapper.insertSocialKolUser(socialKolUser);
    }

    /**
     * 修改用户商品关联
     * 
     * @param socialKolUser 用户商品关联
     * @return 结果
     */
    @Override
    public int updateSocialKolUser(SocialKolUser socialKolUser)
    {
        return socialKolUserMapper.updateSocialKolUser(socialKolUser);
    }

    /**
     * 批量删除用户商品关联
     * 
     * @param userIds 需要删除的用户商品关联主键
     * @return 结果
     */
    @Override
    public int deleteSocialKolUserByUserIds(Long[] userIds)
    {
        return socialKolUserMapper.deleteSocialKolUserByUserIds(userIds);
    }

    /**
     * 删除用户商品关联信息
     * 
     * @param userId 用户商品关联主键
     * @return 结果
     */
    @Override
    public int deleteSocialKolUserByUserId(Long userId)
    {
        return socialKolUserMapper.deleteSocialKolUserByUserId(userId);
    }

    @Override
    public int batchInsertSocialKolUser(List<SocialKolUser> kolList) {
        return socialKolUserMapper.batchInsertSocialKolUser(kolList);
    }

    @Override
    public int batchInsertSocialKolUser(Long userId, List<Long> ids) {
        return socialKolUserMapper.batchInsertOrUpdate(userId, ids);
    }
}
